//类组件props
//父组件
import { Component } from "react";
class App extends Component {
  render() {
    return (
      <div>
        父组件
        <Child msg="类组件props传递"></Child>
      </div>
    )

  }
}
export default App
//子组件
class Child extends Component {
  //Component React父类组件，里面接收并处理的props
  //将props封装成员属性，类竹调用成员属性
  render() {
    //自己调用自己用this
    console.log(this.props);
    //对象解构
    const { msg } = this.props
    return <div>子组件-{msg}</div>
  }
}